We may be switching workspaces because we are focusing a window
that is located on a different workspace.
In case that new focus window was minimized, it currently just pops
up out of nowhere after the animation, as we are only tracking windows
that are visible at the beginning of the transition.
To fix this, don't exclude minimized windows from tracking, but hide
them until they are unminimized.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4199>
(cherry picked from commit
620efa31cd2669ef22e6dc24f2a5dca70918ff57)
this._windowRecords.splice(this._windowRecords.indexOf(record), 1);
}, this);
+ windowActor.meta_window.connectObject('notify::minimized',
+ () => this._syncCloneVisibility(clone),
+ this);
+ this._syncCloneVisibility(clone);
+
this._windowRecords.push(record);
return clone;
}
+ _syncCloneVisibility(clone) {
+ const window = clone.source.meta_window;
+ clone.visible = window.showing_on_its_workspace();
+ }
+
_removeWindows() {
for (const record of this._windowRecords)
record.clone.destroy();
}
_shouldShowWindow(window) {
- if (!window.showing_on_its_workspace() || this._isDesktopWindow(window))
+ if (this._isDesktopWindow(window))
return false;
if (window.is_override_redirect())